﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WITS.Framework.WebPage
{
    /// <summary>
    /// WebPageBase根据PageMapping生成的Module
    /// </summary>
    public class PageModule
    {
        Dictionary<string, object> _v = new Dictionary<string, object>();
        public void SetValue(string columnName, object value)
        {
            if (_v.ContainsKey(columnName))
            {
                _v[columnName] = value;
            }
            else
            {
                _v.Add(columnName, value);
            }
        }
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="columnName"></param>
        /// <returns></returns>
        public T GetValue<T>(string columnName)
        {
            return (T)_v[columnName];
        }
    }
}
